Returns date in requested format.

<div class="definition">
    formatDate(dateStr, format)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>dateStr</td>
        <td><b>string</b> or <b>number</b>, date in common format</td>
    </tr>
    <tr>
        <td>format</td>
        <td><b>string</b>, format to output</td>
    </tr>
    </table>
</div>

The <span class="argument">str</span> argument can be (1) a JavaScript Date, (2) a Unix epoch, (3) any standard date, which will be 
used to create JavaScript Date object. To ensure correct translation it is best to pass a JavaScript Date. 
<div style="height: 20px;"></div>

The format can contain following elements: 
<ul>
    <li><div style="display: inline-block; width: 50px">yyyy</div> - full year</li>
    <li><div style="display: inline-block; width: 50px">yyy</div> - full year</li>
    <li><div style="display: inline-block; width: 50px">yy</div> - 2 letter for the year (will be 3 for 2000 and over)</li>
    <li><div style="display: inline-block; width: 50px">m</div> - month</li>
    <li><div style="display: inline-block; width: 50px">mm</div> - month with leading 0</li>
    <li><div style="display: inline-block; width: 50px">mon</div> - 3 letters of the month</li>
    <li><div style="display: inline-block; width: 50px">month</div> - full text of the month</li>
    <li><div style="display: inline-block; width: 50px">th</div> - month suffix (st, nd, rd, th)</li>
    <li><div style="display: inline-block; width: 50px">d</div> - day</li>
    <li><div style="display: inline-block; width: 50px">dd</div> - day with leading 0</li>
</ul>

<textarea class="javascript">
var a = w2utils.formatDate((new Date()), 'mm-dd-yyyy');
console.log(a);
</textarea>